Browse Source

gray button after meal saved

Mike Plante 2 years ago
parent
commit
ae51591936
1 changed files with 1 additions and 1 deletions
  1. 1 1
      FreeAPS/Sources/Modules/AddCarbs/View/AddCarbsRootView.swift

+ 1 - 1
FreeAPS/Sources/Modules/AddCarbs/View/AddCarbsRootView.swift

@@ -131,7 +131,7 @@ extension AddCarbs {
                                 || (state.carbs <= 0 && state.fat <= 0 && state.protein <= 0)
                                 || (state.carbs <= 0 && state.fat <= 0 && state.protein <= 0)
                         )
                         )
                         .foregroundStyle(
                         .foregroundStyle(
-                            (state.carbs <= 0 && state.fat <= 0 && state.protein <= 0) ? .gray :
+                            mealSaved || (state.carbs <= 0 && state.fat <= 0 && state.protein <= 0) ? .gray :
                                 state.carbs > state.maxCarbs || state.fat > state.maxFat || state.protein > state
                                 state.carbs > state.maxCarbs || state.fat > state.maxFat || state.protein > state
                                 .maxProtein ? .red : .blue
                                 .maxProtein ? .red : .blue
                         )
                         )